package ua.kharkov.knure.pereverziev.diploma.web.util;

import java.util.List;

import javax.servlet.ServletContext;

import ua.kharkov.knure.pereverziev.diploma.db.DAOServices.ServiceFactory;
import ua.kharkov.knure.pereverziev.diploma.db.entity.AdditionalService;
import ua.kharkov.knure.pereverziev.diploma.db.entity.Airport;

public class ConstantsUtility {
	public static void loadAirports(ServletContext servletContext) {
		List<Airport> airports = ServiceFactory.getInstance()
				.getAirportService().getList(new Airport());
		servletContext.setAttribute("airportsList", airports);
	}

	public static void loadServices(ServletContext servletContext) {
		List<AdditionalService> services = ServiceFactory.getInstance()
				.getAdditionalServService().getList(new AdditionalService());
		servletContext.setAttribute("additionalServices", services);
	}
}
